﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Collection.Models
{
    public class Program
    {
        static void Main(string[] args)
        {
        }
    }

    public abstract class Animal
    {
        protected string name;
        public string Name
        {
            get { return name; }
            set { name = value; }
        }
        public Animal() => name = "The animal with no name";

        public Animal(string newName) => name = newName;

        public void Feed() => Console.WriteLine(name);

    }

    public class Cow : Animal
    {
        public void Milk() => Console.WriteLine($"{name} has bean milked");
        public Cow(string newName) : base(newName) { }

        public Cow() { }
    }

    public class Chicken : Animal
    {
        public void LayEgg() => Console.WriteLine($"{name} has laid an egg");
        public Chicken(string newName) : base(newName) { }
        public Chicken() { }
    }

    public class Point
    {
        public int x;
        public int y;
        public Point(int x, int y)
        {
            this.x = x; 
            this.y = y;
        }
    }

    
}
